<?php

namespace app\index\model;

use think\Model;

/**
 * Created by PhpStorm.
 * User: su
 * Date: 2017/12/28
 * Time: 16:07
 */
class Link extends Model
{
    public function getLinkUser($link_id = 3)
    {
        return $this->where('link_id', $link_id)->find();
    }

    public function addLink($arr){

        return $this->save($arr);
    }

    public function getLinkData()
    {
        $data = $this->where('is_deletes','0')->order('link_id desc')->select();
        return $data;
    }

    public function setdeleteLink($id,$arr){

        return $this->where('link_id',$id)->update($arr);
    }

}
